package com.robot.person;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;

import com.robot.common.RecordPathManager;

public class Personal_MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.person_activity);
    }

    public void jumpApp(View view) {
    }

    public void jumpLogin(View view) {
        //todo 方式一类加载
        //类加载跳转，可以成功，维护成本较高且容易出现人为失误
//        try {
//            Class targetClass = Class.forName("com.robot.login.login_MainActivity");
//            Intent intent = new Intent(this, targetClass);
//            intent.putExtra("name","zx");
//            startActivity(intent);
//        } catch (ClassNotFoundException e) {
//            e.printStackTrace();
//        }

        // todo 方式二：全局Map跳转
        Class<?> aClass = RecordPathManager.startTargetActivity("login", "login_MainActivity");
        startActivity(new Intent(this,aClass));
    }
}